<% content_for :menu do %>
	<%= render :partial => "layouts/menu", :locals => {:salleuh => true} %>
<% end %>

<div id="fil_ariane">
	<%= link_to 'Accueil', :controller => :supervision %>
	&gt;
	<%= link_to 'Salles', :controller => :salles %>
	&gt;
	Importer machine(s)
</div>

<h1>Importation de machine dans la salle : <%= Salle.find(@salle_id).nom_salle%></h1>

<% form_tag  "importMachinesWithNmap", :id => "form_import_machine", :name =>"importmachine" do -%>
<!--<form id="form_import_machine" action="/salles/importMachinesWithNmap" method="post">-->
	<%= hidden_field_tag "salle_id", @salle_id %>
	<p>
		<%= radio_button_tag :choix_import, 'reseau_entier', false, :onclick => "$('debut_ip_1').disabled = 'disabled';$('debut_ip_2').disabled = 'disabled';$('fin_ip_1').disabled = 'disabled';$('fin_ip_2').disabled = 'disabled';" %>Importer tous le réseau 172.16.*.*
	</p>
	<p>
		<%= radio_button_tag :choix_import, 'reseau_plage', false, :onclick => "$('debut_ip_1').disabled = '', $('debut_ip_2').disabled = '';$('fin_ip_1').disabled = '';$('fin_ip_2').disabled = '';" %>Importer selon une plage d'adresse IP<br />
		172.16.<%= text_field_tag :debut_ip_1, '', :onkeypress => "if((event.keyCode &lt; 48 || event.keyCode &gt; 57) && event.keyCode != 8 ) event.returnValue = false; if((event.which &lt; 48 || event.which &gt; 57)  && event.keyCode != 8 ) return false;",:maxlength => '3', :style => "width:30px;disabled:disabled; "%>&nbsp;<%= text_field_tag :debut_ip_2, '',:onkeypress => "if(event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false; if(event.which &lt; 48 || event.which &gt; 57) return false;",:maxlength => '3',:style => "width:30px;disabled:disabled; "%> - 172.16.<%= text_field_tag :fin_ip_1, '',:onkeypress => "if(event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false; if(event.which &lt; 48 || event.which &gt; 57) return false;",:maxlength => '3',:style => "width:30px;disabled:disabled; "%>&nbsp;<%= text_field_tag :fin_ip_2, '',:onkeypress => "if(event.keyCode &lt; 48 || event.keyCode &gt; 57) event.returnValue = false; if(event.which &lt; 45 || event.which &gt; 57) return false;",:maxlength => '3',:style => "width:30px;disabled:disabled;"%>
		<br />
		<em>Vous pouvez définir uniquement une adresse de départ.</em>
	</p>
	<span id="error_form_import" style="color:red;font-weight:bold"></span>
	<p>
		<%= link_to 'Démarrer l\'importation', '#',:onclick =>"if(validateFormImport() == true){$('form_import_machine').submit()}"%>
	</p>
<% end -%>